using System;
using System.ComponentModel.DataAnnotations;
using UwinEducation.Domain.Entities;
using UwinEducation.Shared.Enums;

namespace UwinEducation.Application.Dtos
{
    /// <summary>
    /// 学生课表详情DTO
    /// </summary>
    public class StudentScheduleDetailsDto
    {
        /// <summary>
        /// 学生课表详情ID
        /// </summary>
        public Guid Id { get; set; }

        public Guid OrderId { get; set; }

        /// <summary>
        /// 学生课表ID/订单详情ID
        /// </summary>
        public Guid OrderDetailId { get; set; }

        /// <summary>
        /// 教师课表详情ID
        /// </summary>
        public Guid TeacherScheduleDetailsId { get; set; }
        /// 课表状态
        /// </summary>
        public ScheduleStatus Status { get; set; }

        /// <summary>
        /// 废弃原因
        /// </summary>
        public string? Reason { get; set; }

        /// <summary>
        /// 是否强校验
        /// </summary>
        public bool IsForceCheck { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }
        /// <summary>
        /// 学生上课方式类型
        /// </summary>

        public CourseType CourseType { get; set; }


        //public virtual OrderDetail OrderDetail { get; set; }

        public virtual TeacherScheduleDetailsDto TeacherScheduleDetails { get; set; }

        public virtual TeacherScheduleDto TeacherSchedule { get; set; }

        public virtual StudentDto Student { get; set; }
    }

    /// <summary>
    /// 创建学生课表详情DTO
    /// </summary>
    public class CreateStudentScheduleDetailsDtoBase
    {
        /// <summary>
        /// 教师课表详情ID
        /// </summary>
        [Required(ErrorMessage = "教师课表详情ID不能为空")]
        public Guid TeacherScheduleDetailsId { get; set; }
        /// <summary>
        /// 学生上课类型
        /// </summary>
        [Required(ErrorMessage = "学生上课类型不能为空")]
        public CourseType CourseType { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }
    }

    public class CreateStudentScheduleDetailsDto
    {
        /// <summary>
        /// 订单详情ID
        /// </summary>
        public Guid OrderDetailId { get; set; }
        /// <summary>
        /// 教师课表详情ID
        /// </summary>
        public Guid TeacherScheduleDetailsId { get; set; }

        /// <summary>
        /// 是否强校验
        /// </summary>
        public bool IsForceCheck { get; set; }

        /// <summary>
        /// 学生上课类型
        /// </summary>    
        public CourseType CourseType { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }
    }

    /// <summary>
    /// 更新学生课表详情DTO
    /// </summary>
    public class UpdateStudentScheduleDetailsDto
    {
        /// <summary>
        /// 学生课表详情ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 课表状态
        /// </summary>
        public ScheduleStatus? Status { get; set; }

        /// <summary>
        /// 学生上课类型
        /// </summary>    
        public CourseType? CourseType { get; set; }

        /// <summary>
        /// 废弃原因
        /// </summary>
        public string? Reason { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }
    }
} 